<script type="text/javascript" src="js/Cat.js"></script>
<div class="input">
 <form class="validate" method="post" action="cat!saveAdd.do"  enctype="multipart/form-data" >
 
   <table cellspacing="1" cellpadding="3" width="100%" class="form-table">
     <tr> 
       <th><label class="text">分类名称</label></th>
       <td><input type="text" name="cat.name" id="name"   maxlength="60" value=""  dataType="string" required="true"/>       </td>
     </tr>
     <tr> 
       <th><label class="text">分类图片</label></th>
       <td><input type="file" name="image" id="image" size="45"/> </td>
     </tr>     
     <tr>
       <th><label class="text">上级分类</label></th>
       <td>

		<select name="cat.parent_id"  id="parent_id">
		<option value="0">顶级类别</option>
 		<#assign children=catList />
		<#assign level=1 />
		<#include 'select_children.html' />  
		</select>	</td>
     </tr>
     <tr>
       <th><label class="text">商品类型</label></th>
       <td>
       
       <select name="cat.type_id"  id="type_id"  dataType="int" required="true">
       <option value="">--选择商品类型--</option>
        <#list typeList as type>
			<option value="${type.type_id }" >${type.name }</option>
		</#list>	
	 
		</select>
		 &nbsp;&nbsp;<span class="help_icon" helpid="goods_type"></span>
		</td>
		
     </tr>
     <tr>
       <th><label class="text">排序</label></th>
       <td>
       <input type="text" name="cat.cat_order" value="0" style="width:50px"  dataType="int" required="true"/>       </td>
     </tr>
     <tr>
       <th><label class="text">列表中显示</label></th>
       <td><input type="radio" name="cat.list_show" value="1" checked="checked"/>是&nbsp;
       <input type="radio" name="cat.list_show" value="0" />否&nbsp;&nbsp;<span class="help_icon" helpid="cat_listshow"></span>       </td>
     </tr>
   </table>
	<div class="submitlist" align="center">
	 <table>
	 <tr><td >
	            <input  type="button"  value=" 确定 " class="submitBtn"/>
	           <input name="reset" type="reset"  value=" 重置 " class="submitBtn"/>
	   </td>
	   </tr>
	 </table>
	</div>   
   </form>
   
   </div>
<script type="text/javascript">
$(function(){
	$("form.validate").validate();
	Cat.intChkNameEvent();
	
	$("#parent_id").val(${cat_id});
});

</script>
